package com.yf.customdubbo;

import com.yf.customdubbo.registry.IServiceRegistryCenter;
import com.yf.customdubbo.registry.ZkServiceRegistryCenterImpl;
import com.yf.customdubbo.service.IGPService;
import com.yf.customdubbo.service.impl.GPServiceImpl;

public class ServerTest {
    public static void main(String[] args) {
        IGPService iGpService=new GPServiceImpl();
        IServiceRegistryCenter serviceRegistryCenter=new ZkServiceRegistryCenterImpl();
        String serviceAddress="127.0.0.1:8080";
        RpcServer rpcServer=new RpcServer(serviceRegistryCenter,serviceAddress);
        rpcServer.bind(iGpService);
        rpcServer.registerAndListen();
    }
}
